package com.application.attachment.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;

import com.manager.IBaseBean;

 
@Entity
@Table(name = "a_attachment")
public class Attachment implements IBaseBean {

	/** serialVersionUID */
	protected static final long serialVersionUID = -1L;

	public Attachment() {

	}

	@Id
    @GeneratedValue(generator = "generator")    
	@GenericGenerator(name="generator",strategy="increment")
	@Column(name = "id")
	private Long id;

	@Column(name = "fid")
	private String fid;

	@Column(name = "type")
	private String type;

	@Column(name = "filename")
	private String filename;

	@Column(name = "inputtime")
	private Date inputtime;

	@Column(name = "url")
	private String url;

	@Column(name = "bak1")
	private String bak1;

	@Column(name = "bak2")
	private String bak2;

	@Column(name = "bak3")
	private String bak3;

	@Column(name = "operateid",updatable=false)
	private String operateid; // $field.label
	
	@Transient
	private String rname;
	/**
	 * @return Returns the Id.
	 */
	public Long getId() {
		return this.id;
	}

	/**
	 * @param id
	 *        Set the id.
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return Returns the Fid.
	 */
	public String getFid() {
		return this.fid;
	}

	/**
	 * @param fid
	 *        Set the fid.
	 */
	public void setFid(String fid) {
		this.fid = fid;
	}

	/**
	 * @return Returns the Type.
	 */
	public String getType() {
		return this.type;
	}

	/**
	 * @param type
	 *        Set the type.
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return Returns the Filename.
	 */
	public String getFilename() {
		return this.filename;
	}

	/**
	 * @param filename
	 *        Set the filename.
	 */
	public void setFilename(String filename) {
		this.filename = filename;
	}

	/**
	 * @return Returns the Inputtime.
	 */
	public Date getInputtime() {
		return this.inputtime;
	}

	/**
	 * @param inputtime
	 *        Set the inputtime.
	 */
	public void setInputtime(Date inputtime) {
		this.inputtime = inputtime;
	}

	/**
	 * @return Returns the Url.
	 */
	public String getUrl() {
		return this.url;
	}

	/**
	 * @param url
	 *        Set the url.
	 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @return Returns the Bak1.
	 */
	public String getBak1() {
		return this.bak1;
	}

	/**
	 * @param bak1
	 *        Set the bak1.
	 */
	public void setBak1(String bak1) {
		this.bak1 = bak1;
	}

	/**
	 * @return Returns the Bak2.
	 */
	public String getBak2() {
		return this.bak2;
	}

	/**
	 * @param bak2
	 *        Set the bak2.
	 */
	public void setBak2(String bak2) {
		this.bak2 = bak2;
	}

	/**
	 * @return Returns the Bak3.
	 */
	public String getBak3() {
		return this.bak3;
	}

	/**
	 * @param bak3
	 *        Set the bak3.
	 */
	public void setBak3(String bak3) {
		this.bak3 = bak3;
	}

	public String toString() {
		return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
	}

	public String getOperateid() {
		return operateid;
	}

	public void setOperateid(String operateid) {
		this.operateid = operateid;
	}

	public String getRname() {
		return rname;
	}

	public void setRname(String rname) {
		this.rname = rname;
	}
}
